<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// +----------------------------------------------------------------------
// | Qdd_common [ NO ZUO NO DIE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2010-2017 http://www.bocweb.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: Hanj
// +----------------------------------------------------------------------
 
//----------------------------------
// Qdd_common-三方托管获取时间戳类
//----------------------------------

class Qdd_common
{
	private $antistate = 0;
	
	public function getAntiState()
	{
		return $this->antistate;
	}
	
	public function getRandomNum($length)
	{
		$output='';
		for($a=0;$a<$length;$a++)
		{
			$output.=chr(mt_rand(48,57));
		}
		return $output;
	}
	
	public function getTimeStamp()
	{
		$output=gmdate('YmdHis', time() + 3600 * 8).floor(microtime()*1000);
		return $output;
	}
	
	public function getRandomTimeStamp()
	{
		$output=$this->getRandomNum(2).$this->getTimeStamp();
		return $output;
	}
}
?>